home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / dbfscr20.arc / CBBOX.C next >
Text File  |  1991-04-10  |  951b  |  57 lines

  1. #include <s3.h>
  2.  
  3. #define CB_DOUBLE 1
  4. #define CB_SINGLE 0
  5.  
  6. cb_box(ur,uc,lr,lc,dbox)
  7. int ur, uc, lr, lc, dbox;
  8. char boxtype[6];  /* ul ur hor vert ll lr */
  9. {
  10.   int i;
  11.   char boxtype[6];
  12.  
  13.   if(dbox)
  14.   {
  15.     boxtype[0] = '╔';
  16.     boxtype[1] = '╗';
  17.     boxtype[2] = '═';
  18.     boxtype[3] = '║';
  19.     boxtype[4] = '╚';
  20.     boxtype[5] = '╝';
  21.   }
  22.   else
  23.   {
  24.     boxtype[0] = '┌';
  25.     boxtype[1] = '┐';
  26.     boxtype[2] = '─';
  27.     boxtype[3] = '│';
  28.     boxtype[4] = '└';
  29.     boxtype[5] = '┘';
  30.   }
  31.  
  32.   s3(ur,uc,boxtype[0]);
  33.   s3(ur,lc,boxtype[1]);
  34.   for(i=++uc;i<lc;i++)
  35.   {
  36.     s3(ur,i,boxtype[2]);
  37.     s3(lr,i,boxtype[2]);
  38.   }
  39.   for(i=++ur;i<lr;i++)
  40.   {
  41.     s3(i,uc,boxtype[3]);
  42.     s3(i,lc,boxtype[3]);
  43.   }
  44.   s3(lr,uc,boxtype[4]);
  45.   s3(lr,lc,boxtype[5]);
  46.   if(ur == lr)
  47.   {
  48.     s3(ur,uc,boxtype[2]);
  49.     s3(ur,lc,boxtype[2]);
  50.   }
  51.   if(uc == lc)
  52.   {
  53.     s3(ur,uc,boxtype[3]);
  54.     s3(lr,uc,boxtype[3]);
  55.   }
  56. }
  57.